<div class="d-shang-15">
	<div class="d-yuanjiao-10 d-beijing-hongse">
		<div class="d-jindu-biaoti-bug" >修复进度</div>
			<div class="d-jindu-kuang">
				<div class="d-jindu-neikuang">
					<div class="d-jindu-kuan100">
						<div class="d-jindu-tu d-jindu-tu-weizhi d-yuanjiao-10">
							<img src="{HOME_THEME_PATH}web/img/bug.png" class="d-beijing-baise">
						</div>
					</div>
		            <div class="d-jindu-ziti {if $bugs['xuqiu']}d-jiacu d-beijing-wenzi-hongse{/if}">
						已发现BUG
					</div>
					<div class="d-jindu-riqi ">
						{dr_date($t.inputtime, 'Y-m-d')}
					</div>
					<div class="d-jindu-riqi ">
						{dr_date($t.inputtime, 'H:i:s')}
					</div>
				</div>
		        <div class="d-jindu-neikuang d-quxian-0">
					<div class="d-jindu-kuan100">
							<div class="d-jindu-jtiao-bug d-jindu-right d-jindu-hongse {if !$bugs['paiqi']}d-jindu-guodu-bug{/if}">
							</div>
							{if $bugs['paiqi']}
								<div class="d-jindu-tu d-jindu-tu-weizhi d-yuanjiao-10">
									<img src="{HOME_THEME_PATH}web/img/bug.png" class="d-beijing-baise">
								</div>
							{else}
								<div class="d-jindu-tu d-jindu-tu-weizhi d-yuanjiao-10">
									<img src="{HOME_THEME_PATH}web/img/shijianbug.png" class="d-beijing-baise">
								</div>
							{/if}
					</div>
					<a id="d_bug_paiqi_{$id}" data-id="{$id}" data-quanid="{$index.id}" class="d-bugtiao-paiqi">
						<div class="d-jindu-ziti {if $bugs['paiqi']}d-jiacu d-beijing-wenzi-hongse{/if}">
							排期中
						</div>
					</a>
					<div class="d-jindu-riqi">
						{dr_date($bugs['paiqi']['inputtime'], 'Y-m-d')}
					</div>
					<div class="d-jindu-riqi ">
					    {dr_date($bugs['paiqi']['inputtime'], 'H:i:s')}
					</div>
				</div>
				<div class="d-jindu-neikuang d-quxian-0">
					<div class="d-jindu-kuan100">
						<div class="d-jindu-jtiao-bug d-jindu-right {if $bugs['kaifa']}{else}{if $bugs['paiqi']}d-jindu-guodu-bug{/if}{/if} {if $bugs['kaifa']} d-jindu-hongse {/if} ">
							
						</div>
						{if $bugs['kaifa']}
							<div class="d-jindu-tu d-jindu-tu-weizhi d-yuanjiao-10">
								<img src="{HOME_THEME_PATH}web/img/bug.png" class="d-beijing-baise">
							</div>
						{else}
							<div class="d-jindu-tu d-jindu-tu-weizhi d-yuanjiao-10">
								<img src="{HOME_THEME_PATH}web/img/kaifabug.png">
							</div>
						{/if}
						
					</div>
					<a id="d_bug_kaifa_{$id}" data-id="{$id}" data-quanid="{$index.id}" class="d-bugtiao-kaifa">
						<div class="d-jindu-ziti {if $bugs['kaifa']}d-jiacu d-beijing-wenzi-hongse{/if}">
							在开发
						</div>
					</a>
					<div class="d-jindu-riqi"> 
						{dr_date($bugs['kaifa']['inputtime'], 'Y-m-d')}
					</div>
					<div class="d-jindu-riqi ">
						{dr_date($bugs['kaifa']['inputtime'], 'H:i:s')}
					</div>
				</div>
				<div class="d-jindu-neikuang d-quxian-0">
					<div class="d-jindu-kuan100">
						<div class="d-jindu-jtiao-bug d-jindu-right  {if $bugs['wancheng']}{else}{if $bugs['kaifa']} d-jindu-guodu-bug {/if}{/if} {if $bugs['wancheng']}d-jindu-hongse  {/if}">
							
						</div>
						{if $bugs['wancheng']}
							<div class="d-jindu-tu d-jindu-tu-weizhi d-yuanjiao-10">
								<img src="{HOME_THEME_PATH}web/img/bug.png" class="d-beijing-baise">
							</div>
						{else}
							<div class="d-jindu-tu">
								<img src="{HOME_THEME_PATH}web/img/daojibug.png">
							</div>
						{/if}
						
					</div>
					<a id="d_bug_wancheng_{$id}" data-id="{$id}" data-quanid="{$index.id}" class="d-bugtiao-wancheng">
						<div class="d-jindu-ziti {if $bugs['wancheng']}d-jiacu d-beijing-wenzi-hongse{/if}">
							已上线
						</div>
					</a>
					<div class="d-jindu-riqi {if $bugs['wancheng']}d-beijing-wenzi-hongse{/if}"> 
						{dr_date($bugs['wancheng']['inputtime'], 'Y-m-d')}
					</div>
					<div class="d-jindu-riqi {if $bugs['wancheng']}d-beijing-wenzi-hongse{/if}">
					    {dr_date($bugs['wancheng']['inputtime'], 'H:i:s')}
					</div>
				</div>
			</div>
		</div>
	
</div>
{if $bugtitle}
<div class="d-yuanjiao-10 d-beijing-hongse d-shang-15">
	<div class="d-neikuang-20 ">
		{php $bugtitles = dr_string2array($bugtitle);}
		
		{loop $bugtitles $bugid $bugname}
		{if $bugname['zhishixian'] > '0' || $uid == $member.id || $index['uid'] == $member.id}
		<div class="d-kuan">
			<img src="{dr_avatar($bugname['uid'])}" width="22" height="22" class="d-yuanjiao-50 d-shang-8"/>
			{if $bugname['zhishixian'] == '0'}
			<span class="diedai-hong-2 kuang-hong-4-1"> 已关闭 </span>
			{elseif $bugname['zhishixian'] == '1'}
			<span class="diedai-zi-2 kuang-zi-4-1"> 进行中 </span>
			{elseif $bugname['zhishixian'] == '2'}
			<span class="diedai-2 kuang-4-1"> 已完成 </span>
			{elseif $bugname['zhishixian'] == '3'}
			<span class="diedai-huang-2 kuang-huang-4-1"> 审核中 </span>
			{/if}
			
			<span class="d-zuo-5 d-wenzi-14">
				
			{$bugid}. {$bugname['name']} 
			</span>
			
			{if $uid == $member.id || $index['uid'] == $member.id}
			<a href="javascript:dr_edit_bugtitle({$bugid});">
				<span class="d-zuo-10 pull-right  d-shang-8"><i class="fa fa-edit"></i></span>
			</a>
			<a  href="javascript:dr_del_bugtitle({$bugid});">
			<span class="d-zuo-10 pull-right  d-shang-8"><i class="fa fa-trash"></i></span>
			</a>
			{/if}
			<span class="d-zuo-10 d-wenzi-14 pull-right  d-shang-10">{dr_date($bugname['shijian'], 'm-d')}</span>
		</div>
		{/if}
		{/loop}
		<div class="d-kuan d-clear"></div>
	</div>
	
</div>
{/if}
{if $uid == $member.id || $index['uid'] == $member.id}
			<a class="pull-right d-shang-15" href="javascript:dr_add_bugtitle();">
				 <span class="diedai-hong-2 kuang-hong-4-1"><i class="fa fa-plus"></i> 添加修复项目 </span>
			</a>
		{/if}
		<div class="d-kuan d-clear"></div>

<style>
	.diedai-2 {
	    color: #1aca6f;
	    background-color: #dbf1e1;
	    border-color: #71d5a1;
	}
	.kuang-4-1 {
	    display: inline-block;
	    padding: 4px 8px;
	    border-radius: 4px;

	    font-size: 12px;
	    border-width: 1px;
	    border-style: solid;
	    line-height: 1;
	    /* margin-right: 5px; */
	}
	.diedai-zi-2 {
	    color: #b274b4;
	    background-color: #f1e7f0;
	    border-color: #d4a1d5;
	}
	.kuang-zi-4-1 {
	    display: inline-block;
	    padding: 4px 8px;
	    border-radius: 4px;
	    color: #b274b4;
	    font-size: 12px;
	    border-width: 1px;
	    border-style: solid;
	    line-height: 1;
	    /* margin-right: 5px; */
	}
	.diedai-huang-2 {
	    color: #d6ac2b;
	    background-color: #f1e8d9;
	    border-color: #d9d192;
	}
	.kuang-huang-4-1 {
	    display: inline-block;
	    padding: 4px 8px;
	    border-radius: 4px;

	    font-size: 12px;
	    border-width: 1px;
	    border-style: solid;
	    line-height: 1;
	    /* margin-right: 5px; */
	}
	.diedai-hong-2 {
	    color: #353026;
	    background-color: #ececec;
	    border-color: #cbcac7;
	}
	.kuang-hong-4-1 {
	    display: inline-block;
	    padding: 4px 8px;
	    border-radius: 4px;
	    color: #423d3b;
	    font-size: 12px;
	    border-width: 1px;
	    border-style: solid;
	    line-height: 1;
	    /* margin-right: 5px; */
	}
</style>
<script>
	{if $index['uid'] == $member.uid}
	 // 排期
	 $(".d-bugtiao-paiqi").click(function(){
		 var id = $(this).data("id");
		 var quanid = $(this).data("quanid");
		 $.get("{dr_url_prefix('index.php')}?s={MOD_DIR}&c=son&m=bugpaiqi&id="+id+"&quanid="+quanid, function(data){
			 dr_cmf_tips(data.code, data.msg.value + data.msg.jifen);
			 if (data.msg.value=="排期中") {
				window.location.reload();
			}else{
				window.location.reload();
			}
		 }, 'json');
	 });
	// 开发
	$(".d-bugtiao-kaifa").click(function(){
			 var id = $(this).data("id");
			 var quanid = $(this).data("quanid");
			 $.get("{dr_url_prefix('index.php')}?s={MOD_DIR}&c=son&m=bugkaifa&id="+id+"&quanid="+quanid, function(data){
				 dr_cmf_tips(data.code, data.msg.value + data.msg.jifen);
				 if (data.msg.value=="开启开发") {
					window.location.reload();
				}else{
					window.location.reload();
				}
			 }, 'json');
	});
	// 完成
	$(".d-bugtiao-wancheng").click(function(){
			 var id = $(this).data("id");
			 var quanid = $(this).data("quanid");
			 $.get("{dr_url_prefix('index.php')}?s={MOD_DIR}&c=son&m=bugwancheng&id="+id+"&quanid="+quanid, function(data){
				 dr_cmf_tips(data.code, data.msg.value + data.msg.jifen);
				 if (data.msg.value=="完成开发") {
					window.location.reload();
				}else{
					window.location.reload();
				}
			 }, 'json');
	});
	//添加bug标题
	function dr_edit_bugtitle(tid) {
	    dr_iframe("{dr_lang('修改BUG')}", "{dr_member_url($uriprefix.'/son_edit_bug', ['id'=>$id,'indexid'=>$index['id']])}&tid="+tid, '50%', '100');
	}
	function dr_add_bugtitle() {
	    dr_iframe("{dr_lang('添加已修复BUG')}", "{dr_member_url($uriprefix.'/son_add_bug', ['id'=>$id,'indexid'=>$index['id']])}", '50%', '200');
	}
	function dr_del_bugtitle(tid) {
	    dr_ajax_option('{dr_member_url($uriprefix.'/son_del_bug', ['id'=>$id])}&tid='+tid+'&indexid={$index['id']}', '{dr_lang('确定要删除吗？')}', 1)
	}
	{/if}
</script>